package consumer.controller;

import com.dubbo.api.service.ITestaService;
import io.seata.spring.annotation.GlobalTransactional;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Reference(check = false)
    private ITestaService testaService;

    @GlobalTransactional
    @GetMapping("/add")
    public String testa(String name){
        testaService.add(name);
        return "ok a -> b";
    }
}
